<%@ page contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ include file="/common/init.jsp"%>
<link href="<c:url value='/admin/css/custom.css'/>" rel="stylesheet" type="text/css" />
<link href="<c:url value='/admin/css/style.css'/>" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background: #ffffff;
	margin-top:10px;
	margin-left:5px;
	margin-right:5px;
}
-->
</style>
<body><!-- EP交易中的申诉 -->
<div class="EpmsSubTitle"><p><b>申诉处理</b></p>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="EpmsTable">
  <tr>
	  <td class=EpmsTdTitle>申诉人</td>
	  <td class=EpmsTdTitle>主题</td>
	  <td class=EpmsTdTitle>申诉时间</td>
	  <td class="EpmsTdTitle">状态</td>
	  <td class="EpmsTdTitle">操作</td>
  </tr>
	<c:forEach var="msg" items="${page.result }">
		<tr>
			<td class=EpmsTdNoColor align="center">${msg.sendId }&nbsp;</td>
		    <td class=EpmsTdNoColor align="center"><a href="${ctx}/admin/complaininfo.action?id=${msg.id}">${msg.title }</a></td>
		    <td class=EpmsTdNoColor align="center"><fmt:formatDate value="${msg.createDate}" pattern="yyyy-M-dd HH:mm:ss"/>&nbsp;</td>
			<td class="EpmsTdNoColor" align="center">
				<c:if test="${msg.isRead == '0'}">已处理</c:if>
				<c:if test="${msg.isRead == '1'}">未处理</c:if> &nbsp;
			</td>
		    <td class="EpmsTdNoColor">
		    	<c:if test="${msg.isRead == '1'}"><a href="javascript:dohanle('${msg.id}')">处理</a></c:if>
		    </td>
		</tr>
	</c:forEach>
	<tr>
		<td class="EpmsTdNoColor" colspan="5" align="right">
		第${page.pageNo}页&nbsp;&nbsp;
			<c:choose>
			<c:when test="${page.pageNo >1}">
				<a href="javascript:void(0);" style="text-decoration: none;">
					<span onclick="frontpage(${page.pageNo-1})">上一页</span>&nbsp;
				</a>
			</c:when>
			<c:otherwise>
				上一页 &nbsp;
			</c:otherwise>
			</c:choose>
			<c:choose>
				<c:when test="${page.totalPageCount > page.pageNo}">	
					<a href="javascript:void(0);" style="text-decoration: none;">
						<span onclick="nextpage(${page.pageNo+1})">下一页</span> &nbsp;
					</a>
				</c:when>
				<c:otherwise>
					下一页&nbsp;
				</c:otherwise>
			</c:choose>
			&nbsp;共${page.totalPageCount }页
		</td>
	</tr>
</table>
<%-- <table width="100%" border="0" cellspacing="0" cellpadding="0" class="EpmsTable">
  <tr>
	  <td class=EpmsTdTitle>卖家</td>
	  <td class=EpmsTdTitle>买家</td>
	  <td class="EpmsTdTitle">金额</td>
	  <td class=EpmsTdTitle>状态</td>
	  <td class=EpmsTdTitle>查看凭证</td>
	  <td class=EpmsTdTitle>处理时间</td>
	  <td class=EpmsTdTitle>操作</td>
  </tr>
	<c:forEach var="msg" items="${page.result }">
		<tr>
			<td class=EpmsTdNoColor align="center">${msg.sendId }</td>
		    <td class=EpmsTdNoColor align="center"><a href="${ctx}/admin/msginfo.action?id=${msg.id}">${msg.title }</a></td>
			<td class="EpmsTdNoColor" align="center">
				<c:if test="${msg.isRead == '0'}">已读</c:if>
				<c:if test="${msg.isRead == '1'}">未读</c:if>
			</td>
		    <td class=EpmsTdNoColor align="center"><fmt:formatDate value="${msg.createDate}" pattern="yyyy-M-dd HH:mm:ss"/></td>
		</tr>
	</c:forEach>
	<tr>
		<td class="EpmsTdNoColor" colspan="7" align="right">
		第${page.pageNo}页&nbsp;&nbsp;
			<c:choose>
			<c:when test="${page.pageNo >1}">
				<a href="javascript:void(0);" style="text-decoration: none;">
					<span onclick="frontpage(${page.pageNo-1})">上一页</span>&nbsp;
				</a>
			</c:when>
			<c:otherwise>
				上一页 &nbsp;
			</c:otherwise>
			</c:choose>
			<c:choose>
				<c:when test="${page.totalPageCount > page.pageNo}">	
					<a href="javascript:void(0);" style="text-decoration: none;">
						<span onclick="nextpage(${page.pageNo+1})">下一页</span> &nbsp;
					</a>
				</c:when>
				<c:otherwise>
					下一页&nbsp;
				</c:otherwise>
			</c:choose>
			&nbsp;共${page.totalPageCount }页
		</td>
	</tr>
</table> --%>
</body>
<script type="text/javascript">
function dohandle(id){
	window.location.href = "${ctx}/admin/complainhandle.action?id="+id;
}

function frontpage(pageNo){
	location = "${ctx}/admin/receivemsglist.action?pageNo="+pageNo;
}

function nextpage(pageNo){
	location = "${ctx}/admin/receivemsglist.action?pageNo="+pageNo;
}
</script>